package com.cxl.bill.server.db.dao;

import com.cxl.bill.server.db.bean.Bill;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface BillDao {
    int deleteByPrimaryKey(Long id);

    int insert(Bill record);

    int insertSelective(Bill record);

    Bill selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Bill record);

    int updateByPrimaryKey(Bill record);

    List<Bill> listPage(
            @Param("bill") Bill bill,
            @Param("pageNumKey") int pageNum,
            @Param("pageSizeKey") int pageSize);

    Page<Bill> listByUserId(Long userId);
}